<?php
    use GatewayClient\Gateway;
    global $_W,$_GPC;
    $uniacid = $_W['uniacid'];
    $client_id = $_POST['client_id'];
    $rid = intval($_GPC['rid']);
    $reply = pdo_fetch( " SELECT * FROM ".tablename('haoman_dpm_countmoneyreply')." WHERE rid='".$rid."' " );
     $pici =empty($reply['pici'])?1:$reply['pici'];
     $c =100001;

    $uid = $rid.$pici.$uniacid*$c;

    $group = $rid.$pici.$uniacid*$c;
$message = $group;
// 用户已经登录，用户uid在session中

Gateway::bindUid($client_id, $uid);

Gateway::joinGroup($client_id, $group);

Gateway::sendToGroup($group, json_encode($message));
